<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>基本数据类型和引用数据类型的区别</title>
</head>
<script>
  /* 
  基本数据类型和引用数据类型的区别
   */
   //基本数据类型
   var a=10;
   var b=a;
   var a=20;
   console.log(a);//20
   console.log(b);//10
   //引用数据类型
   var aa={
     name:"jason",
   }
   var bb=aa;
   aa[name]="tom";
   console.log(aa[name]);//tom
   console.log(bb[name]);//tom
</script>
<body>
  
</body>
</html>